
/**
 * Write a description of class Test1q6 here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
import java.util.*;
public class Test1q6
{
	
public static void main (String[] args)
{ int a,b,c;
double d,e;
a=8;
b=3;
c=4;
d=3.5;
e=-2.5;
/*System.out.println("d. "+-a+b% -a);
System.out.println("e. "+21/5*3);
System.out.println("f. "+ (2*a +b -c));
System.out.println("g. "+c%3);
System.out.println("h. "+ (2*3-1%3));
System.out.println("i. "+a%b/c);
System.out.println("j. "+-e*b+c);
System.out.println("k. "+Math.sqrt(Math.pow(b,2)));
System.out.println("l. "+Math.sqrt(Math.pow(3,2)+Math.pow(4,2)));
System.out.println("m. "+Math.log(Math.exp(c/4)));
System.out.println("n. "+"hello 34"+2*4);
System.out.println("o. "+89%(5+5)%5);
*/
double sum=0; 
double prod=1;
for(int i=1;i<=1000;i++)
sum=sum-Math.pow(-1,i)*i;
System.out.println("Sum is "+sum);

}
}
